<template>
  <h1>{{ s1 }} 秒后自动跳转</h1>

  <!-- <button :disabled="!isOver">请阅读此协议（{{ s2 }} 秒）</button> -->
  <EscookButton type="default" :disabled="!isOver">请阅读此协议（{{ s2 }} 秒）</EscookButton>
</template>

<script setup>
import { useCountDown } from '@/hooks/count-down.js'

const { count: s1 } = useCountDown(5, () => {
  console.log('假装发生了跳转')
})

const { count: s2, isOver } = useCountDown(10)
</script>

<style scoped></style>
